import 'package:flutter_taotaoshipin/pages/drama/drama_binding.dart';
import 'package:flutter_taotaoshipin/pages/drama/drama_routes.dart';
import 'package:flutter_taotaoshipin/pages/drama/drama_search_page.dart';
import 'package:flutter_taotaoshipin/pages/home/home_binding.dart';
import 'package:flutter_taotaoshipin/pages/home/home_routes.dart';
import 'package:flutter_taotaoshipin/pages/me/me_binding.dart';
import 'package:flutter_taotaoshipin/pages/me/me_routes.dart';
import 'package:flutter_taotaoshipin/pages/recommend/recommend_binding.dart';
import 'package:flutter_taotaoshipin/pages/report/report_routes.dart';
import 'package:flutter_taotaoshipin/pages/root_tab/root_tab_binding.dart';
import 'package:flutter_taotaoshipin/pages/root_tab/root_tab_page.dart';
import 'package:flutter_taotaoshipin/pages/login/login_routes.dart';
import 'package:flutter_taotaoshipin/pages/notfound_page.dart';
import 'package:flutter_taotaoshipin/pages/purchase/subscription/subscription_binding.dart';
import 'package:flutter_taotaoshipin/pages/purchase/subscription/subscription_page.dart';
import 'package:flutter_taotaoshipin/pages/splash/splash_page.dart';
import 'package:flutter_taotaoshipin/pages/webview/webview_page.dart';
import 'package:get/get.dart';

class AppRoutes {
  static String init = splash;
  static String splash = '/splash';
  static String rootTab = '/rootTab';
  static String webview = '/webview';
  static String search = '/search';

  static String login = '/login';
  static String register = '/register';
  static String purchase = '/purchase';
  static String bottomSheetPurchase = '/bottomSheetPurchase';
  static String monthPurchase = '/monthPurchase';
  static String subscription = '/subscription';

  /// 未知
  static String notFound = '/notFound';

  static List<GetPage> routes = [
    GetPage(name: AppRoutes.splash, page: () => const SplashPage()),
    GetPage(
      name: AppRoutes.rootTab,
      page: () => const RootTabPage(),
      bindings: [
        RootTabBinding(),
        RecommendBinding(),
        HomeBinding(),
        DramaBinding(),
        MeBinding(),
      ],
    ),
    GetPage(name: AppRoutes.webview, page: () => const WebViewPage()),
    GetPage(name: AppRoutes.search, page: ()=>DramaSearchPage()),

    GetPage(
      name: AppRoutes.subscription,
      page: () => const SubscriptionPage(),
      binding: SubscriptionBinding(),
    ),

    /// 首页
    ...HomeRoutes.routes,

    /// 我的界面
    ...MeRoutes.routes,

    /// 剧场
    ...DramaRoutes.routes,

    /// 登录
    ...LoginRoutes.routes,

    /// 举报
    ...ReportRoutes.routes,
  ];

  static final unknownRoute =
      GetPage(name: notFound, page: () => const NotFoundPage());
}
